#!/bin/bash
pushd ~/Yunzai-Bot
plugin=$(whiptail \
--title "白狐-Yunzai-Bot-plugin" \
--menu "您想安装什么插件？" \
0 50 0 \
"1" "安装tangxi-plugin             [小月插件]    [#小月帮助]" \
"2" "安装miao-plugin               [喵喵插件]    [#喵喵帮助]" \
"3" "安装xiaoyao-cvs-plugin        [逍遥图鉴]    [#图鉴帮助]" \
"4" "安装Guoba-Plugin              [锅巴插件]    [#锅巴帮助]" \
"5" "安装zhi-plugin                [白纸插件]    [#白纸帮助]" \
"6" "安装xitian-plugin             [戏天插件]    [#插件帮助]" \
"7" "安装hs-qiqi-Plugin            [枫叶插件]    [#枫叶帮助]" \
"8" "安装Akasha-Terminal-plugin    [虚空插件]    [#虚空帮助]" \
"9" "安装Icepray-plugin            [冰祈插件]    [#冰祈帮助]" \
"10" "安装Xiuxian-Plugin-Box-V2     [修仙插件]    [#修仙帮助]" \
"11" "安装Yenai-Plugin              [椰奶插件]    [#椰羊帮助]" \
"12" "安装xiaofei-plugin            [小飞插件]    [#小飞帮助]" \
"13" "安装earth-k-plugin            [土块插件]    [#土块帮助]" \
"14" "安装py-plugin                 [旧版py插件]  [#py帮助]" \
"15" "安装py-plugin                 [新版py插件]  [#py帮助]" \
"16" "安装xianxin-plugin            [闲心插件]    [#闲心帮助]" \
"17" "安装lin-plugin                [麟插件]      [#lin帮助]" \
"18" "安装l-plugin                  [L插件]       [#L插件帮助]" \
"19" "安装qianyu-plugin             [千羽插件]    [#千羽帮助]" \
"20" "安装yunzai-c-v-pluginstar     [清凉图插件]  [#cv帮助]" \
"21" "安装flower-plugin             [抽卡插件]    [#抽卡帮助]" \
"22" "安装auto-plugin               [自动化插件]  请到项目库查看帮助" \
"23" "安装recreation-plugin         [娱乐插件]    请到项目库查看帮助" \
"24" "安装suiyue-plugin             [碎月插件]    请到项目库查看帮助" \
"25" "安装windoge-plugin            [窗口插件]    请到项目库查看帮助" \
"26" "安装Atlas                     [原神图鉴]    请到项目库查看帮助" \
"27" "安装zhishui-plugin            [搜据插件]    请到项目库查看帮助" \
3>&1 1>&2 2>&3)

if [[ $plugin = 1 ]];then
if [ -e /root/Yunzai-Bot/plugins/tangxi-plugin ];then
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m'
read -p "删除[y] 取消[n] :" num
    case $num in
y)
    rm -rf plugins/tangxi-plugin --no-preserve-root
    rm -rf plugins/tangxi-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 开始安装小月插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/txlx/tangxi-plugin \033[0m"
    git clone --depth=1 https://gitee.com/txlx/tangxi-plugin.git ./plugins/tangxi-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 2 ]];then
if [ -d "/root/Yunzai-Bot/plugins/miao-plugin" ]; then 
    echo -e "\033[44;37m 已安装过该插件 是否执行删除 \033[0m";
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/miao-plugin --no-preserve-root
    rm -rf plugins/miao-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 开始安装喵喵插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/yoimiya-kokomi/miao-plugin \033[0m"
    pushd ~/Yunzai-Bot
    git clone --depth=1 https://gitee.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin
    pnpm add image-size -w
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 3 ]];then
if [ -d "/root/Yunzai-Bot/plugins/xiaoyao-cvs-plugin" ]; then 
    echo -e "\033[44;37m 已安装过该插件 是否执行删除 \033[0m:";
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/xiaoyao-cvs-plugin --no-preserve-root
    rm -rf plugins/xiaoyao-cvs-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
esac
    echo -e "\033[36m 安装xiaoyao-cvs-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/guoba-yunzai/guoba-plugin \033[0m"
   
    echo -e "\033[36m 项目地址 https://gitee.com/Ctrlcvs/xiaoyao-cvs-plugin  \033[0m"
    git clone --depth=1 https://gitee.com/Ctrlcvs/xiaoyao-cvs-plugin.git ./plugins/xiaoyao-cvs-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 4 ]];then
if [ -d "/root/Yunzai-Bot/plugins/Guoba-Plugin" ]; then 
    echo -e "\033[44;37m 已安装过该插件 是否执行删除 \033[0m";
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/Guoba-Plugin --no-preserve-root
    rm -rf plugins/Guoba-Plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装Guoba-Plugin网页管理插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/guoba-yunzai/guoba-plugin \033[0m"
    pushd ~/Yunzai-Bot
    git clone --depth=1 https://gitee.com/guoba-yunzai/guoba-plugin.git ./plugins/Guoba-Plugin
    pnpm install --filter=guoba-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi


if [[ $plugin = 5 ]];then
if [ -d "/root/Yunzai-Bot/plugins/zhi-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/zhi-plugin --no-preserve-root
    rm -rf plugins/zhi-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装baizhi-Plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/HeadmasterTan/zhi-plugin \033[0m"
    git clone --depth=1 https://gitee.com/HeadmasterTan/zhi-plugin.git ./plugins/zhi-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 6 ]];then
if [ -d "/root/Yunzai-Bot/plugins/xitian-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
    read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/xitian-plugin --no-preserve-root
    rm -rf plugins/xitian-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装xitian-pluginjs插件管理器";
    echo -e "\033[36m项目地址 https://gitee.com/XiTianGame/xitian-plugin \033[0m"
    git clone --depth=1 https://gitee.com/XiTianGame/xitian-plugin.git ./plugins/xitian-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 7 ]];then
if [ -d "/root/Yunzai-Bot/plugins/hs-qiqi-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/hs-qiqi-plugin --no-preserve-root
    rm -rf plugins/hs-qiqi-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装hs-qiqi-Plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/huasheng1999/hs-qiqi-plugin \033[0m"
    git clone --depth=1 https://gitee.com/huasheng1999/hs-qiqi-plugin.git ./plugins/hs-qiqi-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 8 ]];then
if [ -d "/root/Yunzai-Bot/plugins/akasha-terminal-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/akasha-terminal-plugin --no-preserve-root
    rm -rf plugins/akasha-terminal-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装Akasha-terminal-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/go-farther-and-farther/akasha-terminal-plugin \033[0m"
    git clone --depth=1 https://gitee.com/go-farther-and-farther/akasha-terminal-plugin.git ./plugins/akasha-terminal-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 9 ]];then
if [ -d "/root/Yunzai-Bot/plugins/Icepray" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/Icepray --no-preserve-root
    rm -rf plugins/Icepray --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装Icepray插件 \033[0m";
    echo -e "\033[36m项目地址  https://gitee.com/koinori/Icepray-plugin \033[0m"
    git clone --depth=1 https://gitee.com/koinori/Icepray-plugin.git ./plugins/Icepray
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 10 ]];then
if [ -d "/root/Yunzai-Bot/plugins/Xiuxian-Plugin-Box" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/Xiuxian-Plugin-Box --no-preserve-root
    rm -rf plugins/Xiuxian-Plugin-Box --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装Xiuxian-Plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/ningmengchongshui/Xiuxian-Plugin-Box \033[0m"
    git clone --depth=1  https://gitee.com/ningmengchongshui/Xiuxian-Plugin-Box.git ./plugins/Xiuxian-Plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 11 ]];then
if [ -d "/root/Yunzai-Bot/plugins/yenai-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/yenai-plugin --no-preserve-root
    rm -rf plugins/yenai-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装yenai-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/yeyang52/yenai-plugin  \033[0m"
    git clone --depth=1 https://gitee.com/yeyang52/yenai-plugin ./plugins/yenai-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 12 ]];then
if [ -d "/root/Yunzai-Bot/plugins/xiaofei-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/xiaofei-plugin --no-preserve-root
    rm -rf plugins/xiaofei-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装xiaofei-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/xfdown/xiaofei-plugin  \033[0m"
    git clone --depth=1 https://gitee.com/xfdown/xiaofei-plugin ./plugins/xiaofei-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 13 ]];then
if [ -d "/root/Yunzai-Bot/plugins/earth-k-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/earth-k-plugin --no-preserve-root
    rm -rf plugins/earth-k-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装earth-k-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/SmallK111407/earth-k-plugin  \033[0m"
    git clone --depth=1 https://gitee.com/SmallK111407/earth-k-plugin.git ./plugins/earth-k-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 14 ]];then
if [ -d "/root/Yunzai-Bot/plugins/py-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/py-plugin --no-preserve-root
    rm -rf plugins/py-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装安装旧版py插件插件 \033[0m";
    pushd ~/Yunzai-Bot
    echo -e "\033[36m项目地址 https://gitee.com/realhuhu/py-plugin  \033[0m"
    git clone --depth=1 -b main https://gitee.com/realhuhu/py-plugin.git ./plugins/py-plugin
    echo -e "\033[36m 安装py-plugin依赖"
    pnpm install iconv-lite @grpc/grpc-js @grpc/proto-loader -w
    pushd plugins/py-pluginl
    poetry install
    pushd ~/Yumzai-Bot
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 15 ]];then
if [ -d "/root/Yunzai-Bot/plugins/py-plugin" ]; then
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/py-plugin --no-preserve-root
    rm -rf plugins/py-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装新版py插件 \033[0m";
    pushd ~/Yunzai-Bot
    git clone --depth=1 https://gitee.com/realhuhu/py-plugin.git ./plugins/py-plugin
    pnpm install iconv-lite @grpc/grpc-js @grpc/proto-loader -w
    pushd plugins/py-plugin
    poetry install
fi
fi

if [[ $plugin = 16 ]];then
if [ -d "/root/Yunzai-Bot/plugins/xianxin-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/xianxin-plugin --no-preserve-root
    rm -rf plugins/xianxin-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装xianxin-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/xianxincoder/xianxin-plugin  \033[0m"
    git clone --depth=1 https://gitee.com/xianxincoder/xianxin-plugin.git ./plugins/xianxin-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 17 ]];then
if [ -d "/root/Yunzai-Bot/plugins/lin-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/lin-plugin --no-preserve-root
    rm -rf plugins/lin-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装lin-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/go-farther-and-farther/lin-plugin  \033[0m"
    git clone --depth=1 https://gitee.com/go-farther-and-farther/lin-plugin.git Yunzai-Bot/plugins/lin-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 18 ]];then
if [ -d "/root/Yunzai-Bot/plugins/l-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/l-plugin --no-preserve-root
    rm -rf plugins/l-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装l-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://github.com/liuly0322/l-plugin  \033[0m"
    pushd ~/Yunzai-Bot
    git clone --depth=1 https://github.com/liuly0322/l-plugin.git ./plugins/l-plugin
    pnpm install --filter=l-plugin
fi
fi

if [[ $plugin = 19 ]];then
if [ -d "/root/Yunzai-Bot/plugins/qianyu-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/qianyu-plugin --no-preserve-root
    rm -rf plugins/qianyu-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装qianyu-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/think-first-sxs/qianyu-plugin  \033[0m"
    git clone --depth=1 https://gitee.com/think-first-sxs/qianyu-plugin.git ./plugins/qianyu-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 20 ]];then
if [ -d "/root/Yunzai-Bot/plugins/yunzai-c-v-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/yunzai-c-v-plugin --no-preserve-root
    rm -rf plugins/yunzai-c-v-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装yunzai-c-v-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/xwy231321/yunzai-c-v-plugin  \033[0m"
    git clone --depth=1 https://gitee.com/xwy231321/yunzai-c-v-plugin.git ./plugins/yunzai-c-v-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 21 ]];then
if [ -d "/root/Yunzai-Bot/plugins/flower-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/flower-plugin --no-preserve-root
    rm -rf plugins/flower-plugin --no-preserve-root
    ;;
n)
    
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装flower-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/Nwflower/flower-plugin \033[0m"
    git clone --depth=1  https://gitee.com/Nwflower/flower-plugin.git ./plugins/flower-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 22 ]];then
if [ -d "/root/Yunzai-Bot/plugins/auto-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/auto-plugin --no-preserve-root
    rm -rf plugins/auto-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装auto-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/Nwflower/auto-plugin  \033[0m"
    git clone --depth=1 https://gitee.com/Nwflower/auto-plugin.git ./plugins/auto-plugin 
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 23 ]];then
if [ -d "/root/Yunzai-Bot/plugins/recreation-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/recreation-plugin --no-preserve-root
    rm -rf plugins/recreation-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装recreation-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://github.com/Cold-666/recreation-plugin  \033[0m"
    echo "云溪院gitee克隆地址 https://gitee.com/txlx/recreation-plugin"
    git clone --depth=1 https://gitee.com/txlx/recreation-plugin.git ./plugins/recreation-plugin/
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 24 ]];then
if [ -d "/root/Yunzai-Bot/plugins/suiyue" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/suiyue --no-preserve-root
    rm -rf plugins/suiyue --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装suiyue插件 \033[0m";
    pushd ~
    echo -e "\033[36m项目地址 https://gitee.com/Acceleratorsky/suiyue \033[0m"
    git clone --depth=1 https://gitee.com/Acceleratorsky/suiyue.git ./plugins/suiyue
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 25 ]];then
if [ -d "/root/Yunzai-Bot/plugins/windoge-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/windoge-plugin --no-preserve-root
    rm -rf plugins/windoge-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装windoge-plugin插件 \033[0m";
    echo -e "\033[36m项目地址 https://github.com/gxy12345/windoge-plugin \033[0m"
    git clone --depth=1 https://github.com/gxy12345/windoge-plugin.git ./plugins/windoge-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [[ $plugin = 26 ]];then
if [ -d "/root/Yunzai-Bot/plugins/genshin-atlas" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/genshin-atlas --no-preserve-root
    rm -rf plugins/genshin-atlas --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装genshin-atlas插件 \033[0m";
    echo -e "\033[36m项目地址 https://gitee.com/Nwflower/genshin-atlas \033[0m"
    git clone --depth=1 https://gitee.com/Nwflower/atlas ./plugins/Atlas
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi

if [ $plugin = 27 ];then
if [ -d "/root/Yunzai-Bot/plugins/zhishui-plugin" ]; then 
    echo -e '\033[44;37m 已安装过该插件 是否执行删除 \033[0m' 
read -p "删除[y]取消[n] :" num
    case $num in
y)
    rm -rf plugins/zhishui-plugin --no-preserve-root
    rm -rf plugins/zhishui-plugin --no-preserve-root
    ;;
n)
    exit 1
    ;;
*)
    echo -e "\033[31m 错误输入 退出 \033[0m"
    exit 0
esac
    echo -e "\033[36m 安装zhishui-plugin插件 \033[0m";
    pushd ~
    echo -e "\033[36m项目地址 https://gitee.com/fjcq/zhishui-plugin \033[0m"
    git clone --depth=1 https://gitee.com/fjcq/zhishui-plugin.git ./plugins/zhishui-plugin
    echo -e "\033[36m 执行完成 \033[0m"
fi
fi